<div class="slide-dialog-header">
	<h2>{{title}}</h2>
	<div class="slide-dialog-toolbar">
		<ul>
			<li><span class="ui-btn slide-dialog-close" ng-click="close(false)"><i class="fa fa-remove"></i></span></li>
		</ul>
	</div>
</div>
<div class="slide-dialog-body">
	<div class="x-data-panel-fixed">
		<form name="form" novalidate="novalidate" ng-submit="submit(form.$valid);">
			<div class="x-data-panel-body">
				<div class="data-layout">
					<div class="data-aside">
						<div class="gallery-nav">
							<!-- <div class="gallery-nav-trigger active"><strong>全部图片</strong><em>(175)</em></div>
							<div class="gallery-nav-trigger"><strong>未分组</strong><em>(175)</em></div>
							<div class="gallery-nav-trigger"><strong>文章配图</strong><em>(0)</em></div> -->
							<div class="gallery-nav-trigger" ng-class="{'active': type.id == q[groupParam]}" ng-repeat="type in group track by type.id" ng-click="selectType(type)"><strong>{{type.name}}</strong><em>({{type.count}})</em></div>
							<div class="gallery-nav-trigger" ng-click="addType($event)" data-placement="bottom"><i class="fa fa-plus-square-o"></i>&nbsp;<strong data-placement="bottom">新建分组</strong></div>
						</div>
					</div>
					<div class="data-main">
						<div class="x-toolbar">
							<div class="fl">
								<span class="text-label">{{currentType.name}}</span><span class="text-button" ng-click="rename($event)" data-placement="bottom" ng-if="q[groupParam] > 0">重命名</span><span class="text-button" ng-click="removeType()" ng-if="q[groupParam] > 0">删除分组</span><!-- <span class="text-button" ng-click="removeType()" ng-if="group.length > 1">删除分组</span> -->&nbsp;&nbsp;<button class="x-btn" ng-disabled="!hasSelectedRecords()" ng-click="remove()">删除选中项</button>
							</div>
							<div class="fr x-btn-group">
								<div class="x-upload">
									<!-- <span class="text-label">已关闭图片水印</span> -->
									<button type="button" ngf-select="upload(files)" ngf-model-options="{debounce: 100}" ngf-model-invalid="invalidFiles" ngf-multiple="true" ng-model="files" ngf-accept="accept" ngf-max-files="maxFiles||10" ngf-max-size="maxSize" class="dialog-button"><i class="fa fa-file-image-o"></i><span class="btn-text">本地上传</span></button>
									<div class="x-upload-loading" ng-if="files && files.length > 0">
										<!-- <div class="x-upload-file">
											<span class="file-item file-name"><span class="file-name-inner">易拉宝.jpg</span></span>
											<span class="file-item file-size">(3.66M)</span>
											<span class="file-item file-progress"><span class="file-progress-bg"><span class="file-percentage"></span></span></span>
											<span class="file-item file-tools"><span class="text-button">取消</span></span>
										</div> -->
										<div class="x-upload-file" ng-repeat="file in files track by $index" ng-if="file.uploadable">
											<span class="file-item file-name"><span class="file-name-inner">{{file.name}}</span></span>
											<span class="file-item file-size">({{toBytes(file.size)}})</span>
											<span class="file-item file-progress" ng-if="file.progress > 0 && file.error != true"><span class="file-progress-bg"><span class="file-percentage" ng-style="{width: file.progress + '%'}"></span></span></span>
											<span class="file-item file-message text-danger" ng-if="file.error">{{file.errorMsg}}</span>
											<span class="file-item file-tools"><span class="text-button" ng-click="file.uploader.abort()" ng-if="file.progress < 100">取消</span></span>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="ui-gallery x-grid-fixed" grid-view="gridOptions" grid-selection grid-paging></div>
					</div>
				</div>
			</div>
			<div class="x-data-panel-footer">
				<button class="dialog-button cancel-button" type="button" ng-click="close(false)">取消</button><button class="dialog-button" type="submit">确定</button>
			</div>
		</form>
	</div>
</div>